//
//  PBEThreadManager.h
//  pork-belly-engine
//
//  Created by Park Han Young on 11. 11. 14..
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#ifndef PBETHREADMANAGER_H_
#define PBETHREADMANAGER_H_

namespace PBEngine
{
	class ThreadManager
	{
	public:
		static inline ThreadManager* instance()
		{
			static ThreadManager m_threadManagerInstance;
			return &m_threadManagerInstance;
		}
		
		int createThread(void *(*start_routine)(void *), void *arg);
		void runRoutineOnMainThread(void *(*routine)(void *), void* arg);
		void sleep(unsigned int sec);
	};
}

#endif
